{% extends 'bootstrap-modal-layout.html.twig' %}

{% do script(['libs/jquery-validation.js', 'app/js/thread/user-info-modal/index.js']) %}

{% block title %}{{'thread.other_event.join'|trans}}{% endblock %}

{% block body %}
  <form id="join-event-form" class="form-horizontal" method="post"
  action="{{ path(thread.targetType ~ '_thread_members_become', {threadId:thread.id, (thread.targetType ~ 'Id'):thread.targetId}) }}"
  >
    <div class="form-group">
      <label class="col-md-3 control-label" for="truename">{{'user.fileds.realname'|trans}} </label>
      <div class="col-md-6 controls">
        <input class="form-control" id="truename" type="text" name="truename" value="{{ userProfile.truename }}">
      </div>
    </div>
    <div class="form-group">
      <label class="col-md-3 control-label" for="mobile">{{'user.fields.mobile_label'|trans}}</label>
      <div class="col-md-6 controls">
        <input class="form-control" id="mobile" type="text" name="mobile" value="{{ userProfile.mobile }}">
      </div>
    </div>
    <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
  </form>
{% endblock %}

{% block footer %}
  <button class="btn btn-link" data-dismiss="modal">{{'form.btn.cancel'|trans}}</button>
  <button id="join-event-btn" class="btn btn-primary" data-loading-text="{{'form.btn.submit.submiting'|trans}}" type="submit" data-toggle="form-submit" data-target="#join-event-form">{{'form.btn.submit'|trans}}</button>
{% endblock %}
